FlyTalk.views.HelpView = Ext.extend(Ext.Panel, {

	scroll: true,
	title: 'help',
    initComponent: function (options) {

		Ext.regModel('HelpModel', {
		    fields: [ 
			{
		         name: 'detail1',
		         type: 'string'
		    }, {
		         name: 'detail2',
		         type: 'string'
		    }, {
		         name: 'detail3',
		         type: 'string'
		   }]
		});
		
		// list
    	this.HelpStore = new Ext.data.JsonStore({
			model : 'HelpModel',
			autoLoad: true,
			
			data: [
				{detail1: 'replied', detail2: 'Hey HappyTraveler, welcome to FlyTalk. Get started by saying hi to the people on your flight!', detail3: ''},
				{detail1: 'commented', detail2: 'Jessica, a passenger on your flight, asked, "Does anyone know where I can buy a souvenir?" Can you help her?', detail3: '61'},
				{detail1: 'commented', detail2: '5 people want to find a quiet place to nap. Can you help them?', detail3: '62'},
				{detail1: 'replied', detail2: 'Hey HappyTraveler, can you help the community by answering 5 easy questions about Dulce cafe?', detail3: ''},
			],
		});
		
		this.tweetList = new Ext.List({
			fullscreen: true,
			scroll: true,
			emptyText: '<div style="margin:5px;">No tweets cached.</div>',
			itemTpl : [ 
			       '<div class="list-detail-small"> {detail2} </div>',
			],
			grouped : false,
			indexBar: false,
			//onItemDisclosure: true,
			store: this.HelpStore,
	
			listeners:{
				disclose: function(dv, tweet, index, evt){
					//FlyTalk.views.HelpView.onMenu(index);
				},
			},
		});
	
		this.items = [this.tweetList];
		
		FlyTalk.views.HelpView.superclass.initComponent.call(this);
    },
    
    onMenu: function (ind) {
        Ext.dispatch({
            controller: FlyTalk.controllers.ftController,
            action: 'openMenu',
           // post: record,
            index: ind,
        });
    },
    
});